package com.learning.imoney.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class DataBaseBill extends SQLiteOpenHelper {
    private static final int VERSION=1;
    private static final String DBNAME="Bills.db";   //  创建数据库名叫 Users
    private Context mContext;

    public DataBaseBill(@Nullable Context context) {
        super(context, DBNAME, null, VERSION);
        mContext = context;
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        //创建账单表    bill_info
        db.execSQL("create table bill_info(_id integer primary key autoincrement, money decimal," +
                " time varchar(10),type integer,note varchar(200))");

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
